MGR uses four different coordinate systems, _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordinates , _✓a_✓b_✓s_✓o_✓l_✓u_✓t_✓e
_✓w_✓i_✓n_✓d_✓o_✓w coordinates, _✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e _✓w_✓i_✓n_✓d_✓o_✓w coordinates, and _✓c_✓h_✓a_✓r_✓a_✓c_✓t_✓e_✓r coordinates.
The entire display is represented by _✓d_✓i_✓s_✓p_✓l_✓a_✓y _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s whereas each window
has its own _✓a_✓b_✓s_✓o_✓l_✓u_✓t_✓e _✓w_✓i_✓n_✓d_✓o_✓w, _✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e _✓w_✓i_✓n_✓d_✓o_✓w, and _✓c_✓h_✓a_✓r_✓a_✓c_✓t_✓e_✓r coordinate sys-
tems.
_✓D_✓i_✓s_✓p_✓l_✓a_✓y _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s are in units of pixels. The coordinate ( 0✓0✓0✓0,0✓0✓0✓0)is the top
left pixel on the display. The _✓X coordinate increases to the right, the _✓Y
coordinate increases down. The maximum _✓X and _✓Y coordinate depend upon the
particular display in use, for the SUN-3 they are 1✓1✓1✓11✓1✓1✓15✓5✓5✓52✓2✓2✓2 by 9✓9✓9✓90✓0✓0✓00✓0✓0✓0. Commands that
operate on the context of the entire display, such as reshaping a window are
specified in _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordinates. Windows, when measured in _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordi-
nates include their borders.
_✓A_✓b_✓s_✓o_✓l_✓u_✓t_✓e _✓w_✓i_✓n_✓d_✓o_✓w _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s, as with _✓d_✓i_✓s_✓p_✓l_✓a_✓y _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s, are measured in
units of pixels. The X✓X✓X✓X and Y✓Y✓Y✓Y values increase to the right and down respec-
tively. The origin, coordinate ( 0✓0✓0✓0,0✓0✓0✓0)is at the top left corner of the window,
just inside the window border.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 4 - Coordinate Systems
_✓R_✓e_✓l_✓a_✓t_✓i_✓v_✓e _✓w_✓i_✓n_✓d_✓o_✓w _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s are measured as a fraction of the window's size
and shape. As with _✓a_✓b_✓s_✓o_✓l_✓u_✓t_✓e _✓w_✓i_✓n_✓d_✓o_✓w _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s, each window has its origin, (
0✓0✓0✓0,0✓0✓0✓0), at the top left corner of the window just inside the border, however the
lower right corner of the window is always at coordinate ( 9✓9✓9✓99✓9✓9✓99✓9✓9✓9,9✓9✓9✓99✓9✓9✓99✓9✓9✓9). Graphics
commands to a window in _✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e _✓w_✓i_✓n_✓d_✓o_✓w _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s are automatically scaled
to the size of the window.
_✓C_✓h_✓a_✓r_✓a_✓c_✓t_✓e_✓r _✓c_✓o_✓o_✓r_✓d_✓i_✓n_✓a_✓t_✓e_✓s are measured in rows and columns in the current font,
just like an ordinary terminal. The coordinate ( 0✓0✓0✓0,0✓0✓0✓0)is the top left charac-
ter position in the window. The maximum _✓r_✓o_✓w and _✓c_✓o_✓l_✓u_✓m_✓n in the window depends
All functions and macros and programming examples are shown in a typewriter
font to distinguish them from ordinary text. Similarly, function and macro
arguments are shown in a b✓b✓b✓bo✓o✓o✓ol✓l✓l✓ld✓d✓d✓d t✓t✓t✓ty✓y✓y✓yp✓p✓p✓pe✓e✓e✓ew✓w✓w✓wr✓r✓r✓ri✓i✓i✓it✓t✓t✓te✓e✓e✓er✓r✓r✓r f✓f✓f✓fo✓o✓o✓on✓n✓n✓nt✓t✓t✓t.✓.✓.✓.
The names of often used arguments passed to macros indicate their function,
The integers D✓D✓D✓Dw✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and D✓D✓D✓Dh✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t represent a width and height in _✓d_✓i_✓s_✓p_✓l_✓a_✓y
coordinates.
m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e
The positive integer m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e, represents the bit combination of window
modes. M✓M✓M✓Mo✓o✓o✓od✓d✓d✓de✓e✓e✓e is usually an _✓o_✓red list of constants in _✓t_✓e_✓r_✓m._✓h. A typical
use of m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e is the argument to m_push( m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e) as in m_push( P✓P✓P✓P_✓_✓_✓_F✓F✓F✓FL✓L✓L✓LA✓A✓A✓AG✓G✓G✓GS✓S✓S✓S |✓|✓|✓|
The small positive integers p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t and c✓c✓c✓ch✓h✓h✓hi✓i✓i✓il✓l✓l✓ld✓d✓d✓d represent menus. A _✓c_✓h_✓i_✓l_✓d
menu is linked to a _✓p_✓a_✓r_✓e_✓n_✓t menu forming a tree of menus.
r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s
The positive integer r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s along with r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1 and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 signifies a
radius when referring to circles or major and minor axis when referring
to ellipses. They are only referenced in respect to _✓w_✓i_✓n_✓d_✓o_✓w coordinates.
s✓s✓s✓st✓t✓t✓tr✓r✓r✓ri✓i✓i✓in✓n✓n✓ng✓g✓g✓g
An array of characters, s✓s✓s✓st✓t✓t✓tr✓r✓r✓ri✓i✓i✓in✓n✓n✓ng✓g✓g✓g is a null terminated ASCII character
string. Except where noted, several ASCII control characters can be
included in strings by escaping them with \_✓X, where _✓X is one of the
characters shown in the following table.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 10 - Conventions and Notation
The integers w✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and h✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t represent a width and height in _✓w_✓i_✓n_✓d_✓o_✓w
coordinates.
X✓X✓X✓X,Y✓Y✓Y✓Y
The integer pair ( X✓X✓X✓X,Y✓Y✓Y✓Y) represents a point in _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordinates. The
suffixes s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c and d✓d✓d✓ds✓s✓s✓st✓t✓t✓t as in ( X✓X✓X✓X_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c,Y✓Y✓Y✓Y_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c) or ( X✓X✓X✓X_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,Y✓Y✓Y✓Y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t) are used to
indicate _✓s_✓o_✓u_✓r_✓c_✓e and _✓d_✓e_✓s_✓t_✓i_✓n_✓a_✓t_✓i_✓o_✓n coordinates respectively. Similarly, the
suffixes 1✓1✓1✓1 and 2✓2✓2✓2 as in ( X✓X✓X✓X1✓1✓1✓1,Y✓Y✓Y✓Y1✓1✓1✓1) refer generically to the first or second
coordinate.
x✓x✓x✓x,y✓y✓y✓y
The integers ( x✓x✓x✓x,y✓y✓y✓y) represent a point in _✓w_✓i_✓n_✓d_✓o_✓w coordinates. Whether
that is _✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e (i.e. 0-999) or _✓a_✓b_✓s_✓o_✓l_✓u_✓t_✓e depends upon the current coor-
dinate setting of the window. As with ( X✓X✓X✓X,Y✓Y✓Y✓Y) above, the modifiers
s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c,d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,1✓1✓1✓1, and 2✓2✓2✓2 refer respectively to the _✓s_✓o_✓u_✓r_✓c_✓e, _✓d_✓e_✓s_✓t_✓i_✓n_✓a_✓t_✓i_✓o_✓n, _✓f_✓i_✓r_✓s_✓t,
and _✓s_✓e_✓c_✓o_✓n_✓d coordinates.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 11 - Macros
=> _✓M_✓a_✓c_✓r_✓o_✓s
All of the C library interface macros expand into _✓p_✓r_✓i_✓n_✓t_✓f expressions that con-
vert their command specification into the MGR stream protocol. Compile time
and run time options are available that globally alter the behavior of these
macros to the specific needs of the client program. The options are detailed
in the _✓U_✓s_✓i_✓n_✓g _✓t_✓h_✓e _✓L_✓i_✓b_✓r_✓a_✓r_✓y section of this document. The returned value of the
macro expressions are not meaningful. The macros described here attempt to
reflect the actual state of the system, and may include some inconsistencies
that should be cleaned up in future releases of the software. Every MGR com-
mand (a command identifier - argument count combination) that is accepted by
MGR has a macro describing its function.
m_addchar()
Inserts a space character at the current character cursor position. The
remaining characters on the line, if any, are shifted to the right.
m_addchars( n✓n✓n✓n)
Inserts n✓n✓n✓n space characters at the current character cursor position. The
remaining characters on the line, if any, are shifted to the right.
m_addline()
Inserts a blank line at current row. The current row, and any below it,
are shifted down one line. The bottom line of text is scrolled off the
window.
m_addlines( n✓n✓n✓n)
Inserts n✓n✓n✓n blank lines at current row. The current row, and any below it
are shifted down. The bottom n✓n✓n✓n lines of text are scrolled off the win-
dow. It is much more efficient to call m_addlines( n✓n✓n✓n) once, than it is
to call m_addline()n✓n✓n✓n times.
m_aligntext()
Moves the current character cursor coincident with the current graphics
point. The current graphics point is set with m_go( x✓x✓x✓x,y✓y✓y✓y). This permits
client programs to position characters at arbitrary pixel locations on
Copy a rectangle from one place on the window to another with the copy
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 12 - Macros
function set by m_func( n✓n✓n✓n). The rectangular area at x✓x✓x✓x_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c,y✓y✓y✓y_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c of size
w✓w✓w✓wi✓i✓i✓id✓d✓d✓de✓e✓e✓e by h✓h✓h✓hi✓i✓i✓ig✓g✓g✓gh✓h✓h✓h is combined with the rectangle at x✓x✓x✓x_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,y✓y✓y✓y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t according to
the last function set by m_func(). The resultant rectangle is placed at
Combine the rectangle at position x✓x✓x✓x_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c,y✓y✓y✓y_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c of size w✓w✓w✓wi✓i✓i✓id✓d✓d✓de✓e✓e✓e by h✓h✓h✓hi✓i✓i✓ig✓g✓g✓gh✓h✓h✓h of
bitmap f✓f✓f✓fr✓r✓r✓ro✓o✓o✓om✓m✓m✓m with the rectangle of the same size at x✓x✓x✓x_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,y✓y✓y✓y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t of bitmap
t✓t✓t✓to✓o✓o✓o. The bit-blt function used to combine the two rectangles is set by
m_func(). F✓F✓F✓Fr✓r✓r✓ro✓o✓o✓om✓m✓m✓m and t✓t✓t✓to✓o✓o✓o are scratch-pad bitmap descriptors. Scratchpad
bitmap 0 (zero) represents the current window contents and may be used
for the source , destination or both. If the scratchpad bitmap t✓t✓t✓to✓o✓o✓o does
not already exist, it is created with a size of w✓w✓w✓wi✓i✓i✓id✓d✓d✓de✓e✓e✓e+x✓x✓x✓x_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c by h✓h✓h✓hi✓i✓i✓ig✓g✓g✓gh✓h✓h✓h+y✓y✓y✓y_✓_✓_✓_s✓s✓s✓sr✓r✓r✓rc✓c✓c✓c.
The rectangular region of _✓s_✓c_✓r_✓a_✓t_✓c_✓h_✓p_✓a_✓d bitmap t✓t✓t✓to✓o✓o✓o, starting at x✓x✓x✓x_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,y✓y✓y✓y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t
of extent w✓w✓w✓wi✓i✓i✓id✓d✓d✓de✓e✓e✓e by h✓h✓h✓hi✓i✓i✓ig✓g✓g✓gh✓h✓h✓h, is set, cleared or inverted as determined by the
previous call to m_func(). If the destination t✓t✓t✓to✓o✓o✓o does not exist, it is
created with the dimensions w✓w✓w✓wi✓i✓i✓id✓d✓d✓de✓e✓e✓e by h✓h✓h✓hi✓i✓i✓ig✓g✓g✓gh✓h✓h✓h.
A circle of radius r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s is drawn, centered at x✓x✓x✓x_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,y✓y✓y✓y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t. The points
at the edge of the circle are set, cleared or inverted depending upon the
last call to m_func(). Circles are never scaled, they always appear as
circles on the display, regardless of the window shape. The r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s is
scaled based upon the average w✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and h✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t of the window. Use
m_ellipse()to obtain a scaled circle.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 14 - Macros
m_clear()
The current _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n is cleared, and the character cursor is moved to
position ( 0✓0✓0✓0,0✓0✓0✓0). If no _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n is set, m_clear() clears the entire
window.
m_cleareol()
All of the characters on the current line, starting with the current
character to the end of the _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n, are cleared. If no _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n
is set, m_cleareol() clears to the edge of the window.
m_cleareos()
All of the characters in the current _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n, from the current char-
acter to the end of the _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n, are cleared. If no _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n is
set, m_clear() clears to the end of the window.
m_clearevent( n✓n✓n✓n)
Event n✓n✓n✓n is cleared. The integer n✓n✓n✓n is one of: A✓A✓A✓AC✓C✓C✓CC✓C✓C✓CE✓E✓E✓EP✓P✓P✓PT✓T✓T✓T, A✓A✓A✓AC✓C✓C✓CT✓T✓T✓TI✓I✓I✓IV✓V✓V✓VA✓A✓A✓AT✓T✓T✓TE✓E✓E✓E, B✓B✓B✓BU✓U✓U✓UT✓T✓T✓TT✓T✓T✓TO✓O✓O✓ON✓N✓N✓N_✓_✓_✓_1✓1✓1✓1,
N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y, P✓P✓P✓PA✓A✓A✓AS✓S✓S✓ST✓T✓T✓TE✓E✓E✓E, R✓R✓R✓RE✓E✓E✓ED✓D✓D✓DR✓R✓R✓RA✓A✓A✓AW✓W✓W✓W, R✓R✓R✓RE✓E✓E✓ES✓S✓S✓SH✓H✓H✓HA✓A✓A✓AP✓P✓P✓PE✓E✓E✓E, S✓S✓S✓SN✓N✓N✓NA✓A✓A✓AR✓R✓R✓RF✓F✓F✓FE✓E✓E✓ED✓D✓D✓D,✓,✓,✓, S✓S✓S✓ST✓T✓T✓TA✓A✓A✓AC✓C✓C✓CK✓K✓K✓K, or U✓U✓U✓UN✓N✓N✓NC✓C✓C✓CO✓O✓O✓OV✓V✓V✓VE✓E✓E✓ER✓R✓R✓RE✓E✓E✓ED✓D✓D✓D. See
m_setevent() for a description of the events.
m_clearmenu( n✓n✓n✓n)
If menu n✓n✓n✓n exists, it is cleared.
m_clearmode( m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e)
Clear one of the following window modes. Except where noted, these are
the default settings. The mode settings are more fully explained in
m_setmode().
M✓M✓M✓M_✓_✓_✓_A✓A✓A✓AB✓B✓B✓BS✓S✓S✓S
_✓A_✓b_✓s_✓o_✓l_✓u_✓t_✓e window coordinate mode is turned off. The window is now in
_✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e window coordinates. All window coordinates range from (
0✓0✓0✓0,0✓0✓0✓0) in the upper left corner to ( 9✓9✓9✓99✓9✓9✓99✓9✓9✓9,9✓9✓9✓99✓9✓9✓99✓9✓9✓9) at the lower right.
Draw an ellipse centered at ( x✓x✓x✓x,y✓y✓y✓y). The values for r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1 and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2
are the major and minor axis radii. The ellipse is either set, cleared
or inverted determined by the last call to m_func(). The values for
r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1 and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 are scaled based upon the average width and height of
Draw an ellipse on scratchpad bitmap t✓t✓t✓to✓o✓o✓o centered at ( x✓x✓x✓x,y✓y✓y✓y) where
r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1,r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 are the major and minor axis radii. The ellipse is
either set, cleared or inverted determined by the last call to m_func().
The values for r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1 and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 are scaled based upon the average
w✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and h✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t of the window. If the offscreen bitmap t✓t✓t✓to✓o✓o✓o does not
A window is created at X✓X✓X✓X,Y✓Y✓Y✓Y of size D✓D✓D✓Dw✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h by D✓D✓D✓Dh✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t with no process con-
nected to it. MGR returns the name of the file, a _✓p_✓s_✓e_✓u_✓d_✓o-_✓t_✓t_✓y, that must
be opened in order to talk to the new window. A process which opens that
_✓p_✓s_✓e_✓u_✓d_✓o-_✓t_✓t_✓y becomes a client program, communicating with MGR and the new
window in the usual fashion. For a single process managing multiple win-
The menus p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t and c✓c✓c✓ch✓h✓h✓hi✓i✓i✓il✓l✓l✓ld✓d✓d✓d are linked together. When menu p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t is
popped up and item number i✓i✓i✓it✓t✓t✓te✓e✓e✓em✓m✓m✓m (starting from zero) is highlighted, slid-
ing off to the right of the p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t menu causes the c✓c✓c✓ch✓h✓h✓hi✓i✓i✓il✓l✓l✓ld✓d✓d✓d menu to pop up.
When an item is chosen, MGR sends the concatenation of the action strings
associated with each of the popped-up menus, from left to right (i.e.
p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t to c✓c✓c✓ch✓h✓h✓hi✓i✓i✓il✓l✓l✓ld✓d✓d✓d). An arbitrary tree of menus may be created by linking
successive menus together in this manner. It is up to the application to
indicate on the parent menu item that sliding to the right will pop up a
child menu. Typically "-✓-✓-✓->✓>✓>✓>" is used.
The m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e argument, if not zero, changes the menu options for the p✓p✓p✓pa✓a✓a✓ar✓r✓r✓re✓e✓e✓en✓n✓n✓nt✓t✓t✓t
menu. The flag settings, which may be _✓o_✓r-ed together (except for
Clears the mode M✓M✓M✓MF✓F✓F✓F_✓_✓_✓_S✓S✓S✓SN✓N✓N✓NI✓I✓I✓IP✓P✓P✓P, M✓M✓M✓MF✓F✓F✓F_✓_✓_✓_P✓P✓P✓PA✓A✓A✓AG✓G✓G✓GE✓E✓E✓E, and M✓M✓M✓MF✓F✓F✓F_✓_✓_✓_A✓A✓A✓AU✓U✓U✓UT✓T✓T✓TO✓O✓O✓O.
See also m_loadmenu(), m_selectmenu(), and m_unlinkmenu().
m_loadfont( n✓n✓n✓n,n✓n✓n✓na✓a✓a✓am✓m✓m✓me✓e✓e✓e)
The MGR font whose pathname is n✓n✓n✓na✓a✓a✓am✓m✓m✓me✓e✓e✓e is downloaded into MGR, replacing the
font currently located at position n✓n✓n✓n. Any subsequent calls to
m_font()will select the newly downloaded font. The font that used to be
at position n✓n✓n✓n remains available to windows that are already using it, but
is unavailable for future use. The format of MGR font files is described
The current image contents of the window is copied to the stack.
This is done without altering the current contents of the window.
Stack modes are combined by _✓o_✓r-ing them together to form a saved window
context, such as: m_push( P✓P✓P✓P_✓_✓_✓_M✓M✓M✓ME✓E✓E✓EN✓N✓N✓NU✓U✓U✓U|✓|✓|✓|P✓P✓P✓P_✓_✓_✓_E✓E✓E✓EV✓V✓V✓VE✓E✓E✓EN✓N✓N✓NT✓T✓T✓T) which will save all
events, and menus but leave everything else alone. All stack modes that
require client download data revert to their default settings when they
are _✓p_✓u_✓s_✓h_✓e_✓d. For example, after m_push( P✓P✓P✓P_✓_✓_✓_M✓M✓M✓ME✓E✓E✓EN✓N✓N✓NU✓U✓U✓U|✓|✓|✓|P✓P✓P✓P_✓_✓_✓_E✓E✓E✓EV✓V✓V✓VE✓E✓E✓EN✓N✓N✓NT✓T✓T✓T|✓|✓|✓|P✓P✓P✓P_✓_✓_✓_M✓M✓M✓MO✓O✓O✓OU✓U✓U✓US✓S✓S✓SE✓E✓E✓E) is
called, no events or menus are currently defined, but the mouse remains
where it is. The defined constant _✓P__✓A_✓L_✓L refers to all of the modes.
m_pushsave( m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e)
Certain parts (stack modes) of the current window environment may be
copied to a stack, to be restored at a later time with m_pop()or
m_popall(). The macro m_pushsave() differs from m_push()in that down-
loaded data, such as _✓m_✓e_✓n_✓u_✓s _✓e_✓v_✓e_✓n_✓t_✓s or _✓s_✓c_✓r_✓a_✓t_✓c_✓h_✓p_✓a_✓d bitmaps are copied to the
stack instead of moved, and thus remain in effect after the call to
m_pushsave(). The current window context is thus unaffected. Any combi-
nation of the following pieces of the window environment may be copied to
Draw an ellipse centered at the _✓g_✓r_✓a_✓p_✓h_✓i_✓c_✓s _✓p_✓o_✓i_✓n_✓t. The two radii, r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1
and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 specify the major and minor axis. The ellipse is either set,
cleared, or inverted determined by the last call to m_func(). If the
window is in _✓r_✓e_✓l_✓a_✓t_✓i_✓v_✓e coordinate mode, r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s1✓1✓1✓1 and r✓r✓r✓ra✓a✓a✓ad✓d✓d✓di✓i✓i✓iu✓u✓u✓us✓s✓s✓s2✓2✓2✓2 are scaled
based upon the average w✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and h✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t of the window.
m_resetesc()
The MGR _✓e_✓s_✓c_✓a_✓p_✓e character is reset to its to default value ('\033'). This
turns off the debugging mode turned on by m_setesc().
This sets up a _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n as a _✓V_✓T_✓1_✓0_✓0-_✓l_✓i_✓k_✓e scrolling region. The entire
width of the window from lines f✓f✓f✓fi✓i✓i✓ir✓r✓r✓rs✓s✓s✓st✓t✓t✓t_✓_✓_✓_r✓r✓r✓ro✓o✓o✓ow✓w✓w✓w to l✓l✓l✓la✓a✓a✓as✓s✓s✓st✓t✓t✓t_✓_✓_✓_r✓r✓r✓ro✓o✓o✓ow✓w✓w✓w inclusive becomes
the _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n. See also m_textregion().
m_selectmenu( n✓n✓n✓n)
This macro is used to indicate menu n✓n✓n✓n pops-up in response to pressing the
_✓m_✓i_✓d_✓d_✓l_✓e mouse button. Menus are downloaded (with m_loadmenu()) first,
then selected. Only one menu may be selected at a time on each button.
If the button is already down when this call is made, and there is not
currently a menu associated with the button, then the menu just selected
pops-up immediately. This last feature may be used to pop up different
menus in a context sensitive way.
m_selectmenu2( n✓n✓n✓n)
This macro is used to indicate menu n✓n✓n✓n pops-up in response to pressing the
_✓r_✓i_✓g_✓h_✓t mouse button. Menus are downloaded (with m_loadmenu()) first, then
selected. This macro functions the same as, and should be combined with
m_selectmenu() above, but exists separately for historical reasons.
m_selectwin( n✓n✓n✓n)
Select alternate window n✓n✓n✓n for output. Alternate windows are first
created by m_newwin(). All output goes to the selected window until
either m_selectwin()is called to change windows, or the selected window
is destroyed. If n✓n✓n✓n is 0 (zero) or the currently selected window is des-
troyed, the main, or original window is selected. Input from all windows
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 28 - Macros
is send to the client program on the same input channel. The macro
m_setevent( A✓A✓A✓AC✓C✓C✓CT✓T✓T✓TI✓I✓I✓IV✓V✓V✓VA✓A✓A✓AT✓T✓T✓TE✓E✓E✓E) may be used to help decide what window generated
the input by associating a unique string with each window's _✓A_✓C_✓T_✓I_✓V_✓A_✓T_✓E
event. The _✓s_✓e_✓l_✓e_✓c_✓t_✓e_✓d window and the _✓a_✓c_✓t_✓i_✓v_✓e window are specified indepen-
dently. Selecting a window does not make it the _✓a_✓c_✓t_✓i_✓v_✓e window, and
creating a new window, although it is created as the _✓a_✓c_✓t_✓i_✓v_✓e window, is
The window, previously obscured, was uncovered. If the window also
became the _✓a_✓c_✓t_✓i_✓v_✓e window, the _✓U_✓N_✓C_✓O_✓V_✓E_✓R_✓E_✓D event is sent before the
_✓A_✓C_✓T_✓I_✓V_✓A_✓T_✓E event.
M✓M✓M✓MO✓O✓O✓OV✓V✓V✓VE✓E✓E✓E
The window was moved.
D✓D✓D✓DE✓E✓E✓ES✓S✓S✓ST✓T✓T✓TR✓R✓R✓RO✓O✓O✓OY✓Y✓Y✓Y
The window was destroyed. Only _✓a_✓l_✓t_✓e_✓r_✓n_✓a_✓t_✓e windows (as created by
m_newwin()) cause _✓D_✓E_✓S_✓T_✓R_✓O_✓Y events to be sent. If the _✓m_✓a_✓i_✓n window is
destroyed, the client program is sent a _✓h_✓a_✓n_✓g_✓u_✓p signal, and its con-
nection to MGR is severed.
A✓A✓A✓AC✓C✓C✓CC✓C✓C✓CE✓E✓E✓EP✓P✓P✓PT✓T✓T✓T
Messages are accepted from client programs running in other windows
(see m_sendto()). The content of the message is obtained by speci-
fying the %✓%✓%✓%m✓m✓m✓m parameter as part of the event string, as is fully
described below.
N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y
Register a name with MGR, and make this name available to client
programs. This name is available to other clients, either by a call
to m_getinfo( G✓G✓G✓G_✓_✓_✓_N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y) or with the %✓%✓%✓%n✓n✓n✓n parameter described below.
Unlike the other events, the _✓n_✓o_✓t_✓i_✓f_✓y string is never sent back to the
client program by MGR, but is used to register a name for the win-
dow.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 30 - Macros
S✓S✓S✓SN✓N✓N✓NA✓A✓A✓AR✓R✓R✓RF✓F✓F✓FE✓E✓E✓ED✓D✓D✓D
Text was put into the snarf buffer either by a client program with
m_put() or by use of the system _✓c_✓u_✓t function.
P✓P✓P✓PA✓A✓A✓AS✓S✓S✓ST✓T✓T✓TE✓E✓E✓E
Text is about to arrive as a result of the system _✓p_✓a_✓s_✓t_✓efunction.
Some _✓e_✓v_✓e_✓n_✓t strings may contain substitutable parameters in the manner of
_✓p_✓r_✓i_✓n_✓t_✓f format specifiers (i.e. %X). These parameters are applicable only
to certain types of events. In any case, the % character may be forced
by doubling it, as in %%. Where more than one data item replaces the
format specifier, the items are separated by a _✓s_✓p_✓a_✓c_✓e character. For the
event strings B✓B✓B✓BU✓U✓U✓UT✓T✓T✓TT✓T✓T✓TO✓O✓O✓ON✓N✓N✓N_✓_✓_✓_1✓1✓1✓1 and B✓B✓B✓BU✓U✓U✓UT✓T✓T✓TT✓T✓T✓TO✓O✓O✓ON✓N✓N✓N_✓_✓_✓_2✓2✓2✓2, several parameters cause MGR to
sweep out some object in response to mouse movement, and report back the
size of the swept object when the button is released. Any one of lines,
boxes, text, or rectangles may be swept out with this mechanism. Initial
parameters may be associated with a sweep event by listing them as comma
separated integers following the % and preceding the sweep command char-
acter. The parameters (if any) set the initial size of the object to be
swept, in the same coordinate system in which the sweep extend is
reported.
%✓%✓%✓%r✓r✓r✓r Depressing the button causes MGR to sweep out a rectangle in
response to moving the mouse, in a manner similar to the system
_✓r_✓e_✓s_✓h_✓a_✓p_✓e function. The initial parameters set the initial width and
height of the rectangle. When the button is released, the coordi-
nates of the _✓s_✓t_✓a_✓r_✓t_✓i_✓n_✓g and _✓e_✓n_✓d_✓i_✓n_✓g points of the rectangle in response
to moving the mouse, in _✓w_✓i_✓n_✓d_✓o_✓w coordinates, are substituted for the
%_✓r.
%✓%✓%✓%R✓R✓R✓R Depressing the button causes MGR to sweep out a rectangle, as in %_✓r
above, only the the result is in _✓d_✓i_✓s_✓p_✓l_✓a_✓ycoordinates.
%✓%✓%✓%b✓b✓b✓b Depressing the button causes MGR to move a rectangle in response to
moving the mouse, in a manner similar to the system _✓m_✓o_✓v_✓e function.
The initial parameters set the initial width and height of the rec-
tangle to be moved. When the button is released, the current coor-
dinates of the box's corner is returned in _✓w_✓i_✓n_✓d_✓o_✓w coordinates, sub-
stituted for the %_✓b.
%✓%✓%✓%B✓B✓B✓B Depressing the button causes MGR to move a rectangle in response to
moving the mouse, in a manner similar to the system _✓m_✓o_✓v_✓e function.
The initial parameters set the initial width and height of the rec-
tangle to be moved. When the button is released, the current coor-
dinates of the box's corner is returned in _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordinates, sub-
stituted for the %_✓b.
%✓%✓%✓%l✓l✓l✓l Depressing the button causes MGR to sweep out a line. One end of
the line remains fixed at the _✓g_✓r_✓a_✓p_✓h_✓i_✓c_✓s _✓p_✓o_✓i_✓n_✓t while the other end of
the line tracks the mouse position. The initial end point of the
line may be specified as a displacement from the graphics point as
part of the initial parameters. When the button is released, the
coordinates of the _✓s_✓t_✓a_✓r_✓t_✓i_✓n_✓g and _✓e_✓n_✓d_✓i_✓n_✓g points of the line, in _✓w_✓i_✓n_✓d_✓o_✓w
coordinates, are substituted for the %_✓l.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 31 - Macros
%✓%✓%✓%t✓t✓t✓t Depressing the button causes MGR to sweep out text, in a manner
equivalent to the system _✓c_✓u_✓t function. Upon the release of the but-
ton, the %_✓t is replaced by the starting character coordinate of the
_✓c_✓u_✓t region, followed by character distance to the ending point in
columns and lines respectively. For example, The event string
_✓s_✓w_✓e_✓e_✓p[%✓%✓%✓%t✓t✓t✓t] might return _✓s_✓w_✓e_✓e_✓p[1✓1✓1✓17✓7✓7✓7 5✓5✓5✓5 6✓6✓6✓6 0✓0✓0✓0], indicating the user swept
out a six character word on a single line, starting on c✓c✓c✓co✓o✓o✓ol✓l✓l✓lu✓u✓u✓um✓m✓m✓mn✓n✓n✓n 17,
r✓r✓r✓ro✓o✓o✓ow✓w✓w✓w 5. An inital size may ber specified in number of rows and
number of columns.
The remaining format specifiers are replaced by the information described
below No sweep action is performed.
%✓%✓%✓%p✓p✓p✓p The %_✓p is replaced by the current mouse coordinates, in _✓w_✓i_✓n_✓d_✓o_✓w coor-
dinates.
%✓%✓%✓%P✓P✓P✓P The %_✓P is replaced by the current mouse coordinates, in _✓c_✓h_✓a_✓r_✓a_✓c_✓t_✓e_✓r
coordinates.
%✓%✓%✓%n✓n✓n✓n If the mouse cursor is over a window whose N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y event is set, the
text of that message is substituted for the %_✓n.
%✓%✓%✓%w✓w✓w✓w If the mouse cursor is over a window whose N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y event is set, the
w✓w✓w✓wi✓i✓i✓in✓n✓n✓nd✓d✓d✓do✓o✓o✓ow✓w✓w✓w_✓_✓_✓_i✓i✓i✓id✓d✓d✓d of the clicked on window is substituted for the %_✓w. This
w✓w✓w✓wi✓i✓i✓in✓n✓n✓nd✓d✓d✓do✓o✓o✓ow✓w✓w✓w_✓_✓_✓_i✓i✓i✓id✓d✓d✓d may be used by m_sendto()to send the clicked-on window a
message.
%✓%✓%✓%S✓S✓S✓S If the mouse cursor is over a window whose N✓N✓N✓NO✓O✓O✓OT✓T✓T✓TI✓I✓I✓IF✓F✓F✓FY✓Y✓Y✓Y event is set, the
length of that message is substituted for the %_✓S.
The A✓A✓A✓AC✓C✓C✓CC✓C✓C✓CE✓E✓E✓EP✓P✓P✓PT✓T✓T✓T event is used to receive messages from other client programs.
The following substituteable parameters may be used as part of the event
string.
%✓%✓%✓%f✓f✓f✓f The w✓w✓w✓wi✓i✓i✓in✓n✓n✓nd✓d✓d✓do✓o✓o✓ow✓w✓w✓w_✓_✓_✓_i✓i✓i✓id✓d✓d✓d of message sender, as used in m_sendto(), replaces the
%_✓f.
%✓%✓%✓%m✓m✓m✓m The text of message sent by the other client program replaces the %_✓m
%✓%✓%✓%s✓s✓s✓s The length of the message, in characters, replaces the %_✓s. For
The text s✓s✓s✓st✓t✓t✓tr✓r✓r✓ri✓i✓i✓in✓n✓n✓ng✓g✓g✓g is printed starting at the location ( x✓x✓x✓x_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t,y✓y✓y✓y_✓_✓_✓_d✓d✓d✓ds✓s✓s✓st✓t✓t✓t) on
_✓s_✓c_✓r_✓a_✓t_✓c_✓h_✓p_✓a_✓d bitmap t✓t✓t✓to✓o✓o✓o. The text is clipped to fit in the bitmap, and no
special command processing is done on s✓s✓s✓st✓t✓t✓tr✓r✓r✓ri✓i✓i✓in✓n✓n✓ng✓g✓g✓g.✓.✓.✓. If t✓t✓t✓to✓o✓o✓o is 0 (zero), The
text is printed on the window, but _✓t_✓e_✓x_✓t _✓r_✓e_✓g_✓i_✓o_✓n boundaries are ignored.
This is the only way to get text into a window outside of the _✓t_✓e_✓x_✓t
The _✓M_✓G_✓R-_✓h_✓o_✓s_✓t, display size (in pixels) and window border size (in pixels)
is placed in the arguments h✓h✓h✓ho✓o✓o✓os✓s✓s✓st✓t✓t✓t,x✓x✓x✓xm✓m✓m✓ma✓a✓a✓ax✓x✓x✓x,y✓y✓y✓ym✓m✓m✓ma✓a✓a✓ax✓x✓x✓x, and b✓b✓b✓bo✓o✓o✓or✓r✓r✓rd✓d✓d✓de✓e✓e✓er✓r✓r✓r. For any _✓N_✓U_✓L_✓L
The position of the window on the display, in _✓d_✓i_✓s_✓p_✓l_✓a_✓y coordinates is
placed into X✓X✓X✓X,Y✓Y✓Y✓Y,D✓D✓D✓Dw✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h and D✓D✓D✓Dh✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t. For any _✓N_✓U_✓L_✓L argument, no value is
returned.
char *
get_termcap()
A string containing a _✓T_✓E_✓R_✓M_✓C_✓A_✓P entry, suitable for placing into the
_✓T_✓E_✓R_✓M_✓C_✓A_✓P environment variable is returned. The function get_termcap()
returns _✓N_✓U_✓L_✓L upon failure.
int
is_active()
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 38 - Functions
The function is_active() returns _✓T_✓R_✓U_✓E if the window is the _✓a_✓c_✓t_✓i_✓v_✓e window
An alternate window is created as the _✓a_✓c_✓t_✓i_✓v_✓e window, at display coordi-
nates ( X✓X✓X✓X,Y✓Y✓Y✓Y) and of size D✓D✓D✓Dw✓w✓w✓wi✓i✓i✓id✓d✓d✓dt✓t✓t✓th✓h✓h✓h by D✓D✓D✓Dh✓h✓h✓he✓e✓e✓ei✓i✓i✓ig✓g✓g✓gh✓h✓h✓ht✓t✓t✓t pixels. If the window is too
big to fit on the display, its width and height are truncated. The
alternate window's _✓w_✓i_✓n_✓d_✓o_✓w-_✓i_✓d is returned if the window was created suc-
cessfully. The macro m_selectwin() is used to write on the newly created
window.
int
m_setup( m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e)
int mode;
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 39 - Functions
This function initializes the library. It must be called before any
other function or macro. The argument m✓m✓m✓mo✓o✓o✓od✓d✓d✓de✓e✓e✓e is one or more of the flags
_✓M__✓F_✓L_✓U_✓S_✓H, _✓M__✓D_✓E_✓B_✓U_✓G, or _✓M__✓M_✓O_✓D_✓E_✓O_✓K _✓o_✓r-ed together. If _✓M__✓F_✓L_✓U_✓S_✓H is present, all
macros and function flush output to MGR after each macro call. This is
slightly less efficient than letting the client program flush the data
(see m_flush() ) but prevent inadvertent buffering problems. The _✓M__✓D_✓E_✓B_✓U_✓G
flag forces the macro package to read and write from _✓s_✓t_✓d_✓i_✓n and _✓s_✓t_✓d_✓o_✓u_✓t
respectively. Normally /_✓d_✓e_✓v/_✓t_✓t_✓y is opened for reading and writing to
permit standard input or output redirection while still maintaining a
connection to MGR. If /_✓d_✓e_✓v/_✓t_✓t_✓y can not be opened, as would be the case
for clients invoked through _✓r_✓s_✓h, the _✓M__✓D_✓E_✓B_✓U_✓G flag is turned on, and _✓s_✓t_✓d_✓i_✓n
and _✓s_✓t_✓d_✓o_✓u_✓t are used instead. The _✓M__✓M_✓O_✓D_✓E_✓O_✓K flag instructs those functions
which expect data from MGR to assume the terminal modes are set appropri-
ately. Otherwise, the functions attempt to turn off character echoing
and turn on line mode before fetching data from MGR. The functions
m_ttyset() and m_ttyreset() can be used to set and reset the terminal
modes. The function m_setup() returns its argument, with the _✓M__✓D_✓E_✓B_✓U_✓G
flag _✓o_✓r-ed in if /_✓d_✓e_✓v/_✓t_✓t_✓y can not be opened.
void
m_ttyreset()
The terminal modes are restored to their state just prior to the last
call to m_ttyset(). Calls to m_ttyset() and m_ttyreset() may be stacked
up to ten levels.
int
m_ttyset()
The terminal is set in a state suitable for data exchange with MGR.
Character echoing is turned off, and line processing mode is enabled.
The function returns zero (0) if it successfully retrieves the terminal
modes, -1 otherwise.
July 7, 1988 MGR 4.0 c 1988 Bellcore
MGR-C Language Application Interface- 40 - Using the Library